﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Setup/MasterPage.master" AutoEventWireup="true" CodeFile="Columns.aspx.cs" Inherits="Setup_Columns" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    &nbsp;
    <asp:HyperLink ID="HyperLink1" runat="server">返回</asp:HyperLink><br />
    表基本设置
    <br />
    <table style="width:100%;">
        <tr>
            <td>
                表名<asp:Literal ID="tablename" runat="server"></asp:Literal>
            &nbsp;中文名<asp:TextBox ID="tableShowName" runat="server"></asp:TextBox>
&nbsp;当前位置<asp:TextBox ID="locationText" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                父字段名<asp:TextBox ID="pname" runat="server"></asp:TextBox>
&nbsp;父根值<asp:TextBox ID="prootvalue" runat="server"></asp:TextBox>
&nbsp;深度<asp:TextBox ID="depth" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                允许添加<asp:CheckBox ID="allowadd" runat="server" />
&nbsp;允许修改<asp:CheckBox ID="allowedit" runat="server" Checked="True" />
&nbsp;允许删除<asp:CheckBox ID="allowdel" runat="server" Checked="True" />
&nbsp;允许查看<asp:CheckBox ID="allowshow" runat="server" />
&nbsp;是否单页<asp:CheckBox ID="issingle" runat="server" Checked="True" />
                允许多选<asp:CheckBox ID="allowmselect" runat="server" />
                允许移动分类<asp:CheckBox ID="allowmove" runat="server" />
                分类参数名<asp:TextBox ID="typetabparamname" runat="server"></asp:TextBox>
                允许导出<asp:CheckBox ID="allowoutput" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                主键字段名<asp:TextBox ID="pkfieldname" runat="server"></asp:TextBox>
&nbsp;外键字段名<asp:TextBox ID="fkfieldname" runat="server"></asp:TextBox>
&nbsp;外键主表表名<asp:TextBox ID="fkmaintablename" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                允许分页<asp:CheckBox ID="allowpageing" runat="server" />
                每页条数<asp:TextBox ID="pagesize" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                排序字段名<asp:TextBox ID="orderfieldname" runat="server"></asp:TextBox>
&nbsp;排序sql<asp:TextBox ID="ordersql" runat="server"></asp:TextBox>
                排序分组相等字段<asp:TextBox ID="ordergroup" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                参数格式: 参数名1[:参数来源1][,参数名2[:参数来源2]...],<br />
                来源:d(数据库),q(查询字符串)默认为d</td>
        </tr>
        <tr>
            <td>
                列表地址<asp:TextBox ID="listurl" runat="server" Width="287px"></asp:TextBox>
                <asp:TextBox ID="listurlparam" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                使用视图（查询）作为列表来源 视图名<asp:TextBox ID="viewname" runat="server"></asp:TextBox>
                xml名<asp:TextBox ID="vxmlname" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                添加地址<asp:TextBox ID="addurl" runat="server" Width="287px"></asp:TextBox>
                <asp:TextBox ID="addurlparam" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                编辑地址<asp:TextBox ID="editurl" runat="server" Width="286px"></asp:TextBox>
                <asp:TextBox ID="editurlparam" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                删除地址<asp:TextBox ID="delurl" runat="server" Width="285px"></asp:TextBox>
                <asp:TextBox ID="delurlparam" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                查看地址<asp:TextBox ID="showurl" runat="server" Width="285px"></asp:TextBox>
                <asp:TextBox ID="showurlparam" runat="server"></asp:TextBox>
            </td>
        </tr>
        <!--
        <tr>
            <td>
                允许控制角色访问<asp:CheckBox ID="allowrolectrl" runat="server" />
                <asp:CheckBoxList ID="allowroles" runat="server" RepeatColumns="4" 
                    RepeatDirection="Horizontal">
                </asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td>
                允许控制用户访问<asp:CheckBox ID="allowuserctrl" runat="server" />
                <asp:CheckBoxList ID="allowusers" runat="server" RepeatColumns="4" 
                    RepeatDirection="Horizontal">
                </asp:CheckBoxList>
            </td>
        </tr>
        -->
        <tr>
            <td>
                操作前执行：添加<asp:TextBox ID="beforeinsert" runat="server"></asp:TextBox>
                更新<asp:TextBox ID="beforeupdate" runat="server"></asp:TextBox>
                删除<asp:TextBox ID="beforedelete" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                操作后执行：添加<asp:TextBox ID="afterinsert" runat="server"></asp:TextBox>
                更新<asp:TextBox ID="afterupdate" runat="server"></asp:TextBox>
                删除<asp:TextBox ID="afterdelete" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="确定" />
                <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="更新字段到配置文件" />
            </td>
        </tr>
    </table>
    <table style="width:100%;">
        <tr>
            <td valign="top">
                数据库中的字段<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
        <Columns>
            <asp:TemplateField HeaderText="字段名">
                <ItemTemplate>
                    <a href='setupColumn.aspx?tab=<%= tabname %>&xml=<%= xmlname %>&col=<%# Eval("column_name") %>&ctype=<%# Eval("data_type") %>'><%# Eval("column_name") %></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Data_type" HeaderText="数据类型" />
        </Columns>
    </asp:GridView>
            </td>
            <td valign="top">
                配置文件中的字段<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False">
                    <Columns>
                        <asp:BoundField DataField="columnname" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>

